<?php
$this->breadcrumbs = array(
	'员工列表' => array(
		'employee/index'
	),
	$model->employee->getFullName() => array(
		'employee/view',
		'id' => $model->employeeId
	),
	'证书管理',
);

$this->userActions = array(
	array(
		'label' => '证书列表',
		'url' => array(
			'index'
		)
	),
	array(
		'label' => '添加证书',
		'url' => array(
			'create',
			'employeeId' => $model->employeeId
		),
		'visible' => Yii::app()->user->checkAccess('employeeManage')
	),
);

?>

<h1>证书管理：<?php echo $model->employee->getFullName() ?></h1>
<?php $this
	->widget('zii.widgets.grid.CGridView',
		array(
			'id' => 'employee-certificate-grid',
			'dataProvider' => $model->search(),
			'filter' => $model,
			'columns' => array(
				//'id',
				//'employeeId',
				array(
					'name' => 'imagePath',
					'type' => 'raw',
					'filter' => false,
					'value' => 'CHtml::link(CHtml::image(Yii::app()->baseUrl."/uploads/employeeCertificate/tn/".$data->thumbPath),Yii::app()->baseUrl."/uploads/employeeCertificate/".$data->imagePath,array("target"=>"_blank"))',
				),
				array(
					'name' => 'typeId',
					'type' => 'raw',
					'value' => '$data->getDisplayType()',
					'filter' => EmployeeCertificate::getTypes()
				),
				'grantDate',
				'summary',
				'note',
				/*
				'imagePath',
				'thumbPath',
				'createTime',
				'createUserId',
				'updateTime',
				'updateUserId',
				 */
				array(
					'class' => 'CButtonColumn',
				),
			),
		));
?>
